<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>操作标签的原生属性</title>
</head>
<body>
<a href="https://www.baidu.com" class="content">去百度</a>
<script>
  //必须要用选择器才能访问到元素
  var ele = document.querySelector('.content');
  console.log( ele.href );

  //设置原生属性
  ele.href = 'https://www.jd.com';
</script>
</body>
</html>